package com.qingsong.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SpringDocConfig {  
  
    private static final String AUTHOR = "qingsong";
    private static final String URL = "http://localhost:8101/index.html";
    private static final String TITLE = "My-club测试项目";
    private static final String INFO = "My-club测试项目-描述信息";
    private static final String VERSION = "1.0.0";  
  
    /** 通用信息Bean */
    @Bean
    public OpenAPI commonInfo() {
        return new OpenAPI().info(new Info()
                .title(TITLE)
                .description(INFO)
                .version(VERSION)
                .contact(new Contact().name(AUTHOR).url(URL)));
    }
}